<extend name="Public:index" />
<block name="main-crumb">
    <li class="active">变量类型</li>
</block>
<block name="main-content">
    <div class="container-fluid">
        <div class="card">
            <div class="card-body">
                <form class="" action="{:U('device_list')}" method="post">
                    <div class="row">
                        <div class="col-md-3">
                            <div class="form-group row">
                                <label for="example-text-input" class="col-sm-5 col-form-label ">监控点位名称</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="param_name" name='param_name' value="{$param_name}">
                                </div>

                            </div>

                        </div>
                        <div class="col-md-5">
                            <div class="form-group row">
                                <label for="example-text-input" class="col-sm-6 col-form-label ">专用设备控制器类型</label>
                                <div class="col-sm-6">
                                    <select id="var_type" name="var_type" class="form-control">
                                        <option value="">请选择</option>
                                        <volist name="cpn_class" id="r">
                                            <option value="{$r[id]}" <if condition="$var_type eq $r['id']">selected</if>>{$r[group_name]}</option>
                                        </volist>
                                    </select>
                                </div>
                               
                            </div>

                        </div>
                        <div class="col-md-2">
                         <div class="col-sm-2">
                                    <input type="submit" class="btn btn-primary waves-effect waves-light" id="searth"
                                        value="搜索" />

                                </div>
                        </div>
                        <div class="col-md-2">
        
                         <label for="example-text-input" class="col-sm-12 col-form-label text-right"><a  class="btn btn-primary" href="{:U('device_add')}">添加监控点位</a></label>
                        </div>
                    </div>
                </form>
            </div>
            <!--end card-body-->
        </div>
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <table class="table table-bordered mb-0 table-centered">
                            <thead>
                                <tr>
                                    <th>编号</th>
                                    <th>监控点位名称</th>
                                    <th>信号类型</th>
                                    <th>扩展模块类型</th>
                                    <th>末端设备类型</th>
                                    <th>单元类型</th>
                                    <th>专用设备控制器类型</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                <volist name="list" id="mlist">
                                    <tr>
                                        <td>{$mlist[id]}</td>
                                        <td>{$mlist[device_param_name]}</td>
                                        <td>{$mlist[sign_name]}</td>
                                        <td>{$mlist[control_name]}</td>
                                        <td>{$mlist[sensor_name]}</td>
                                        <td>0x{:dechex($mlist[cpn_type])}</td>
                                        <td>{$mlist[group_name]}</td>
                                        <td> <a href="{:U('device_edit',array('id'=>$mlist[id]))}">编辑</a>&nbsp;&nbsp;
                                            |&nbsp;&nbsp;

                                            <a href="javascript:if(confirm('确认删除？'))location='{:U('device_deletes',array('id'=>$mlist[id]))}'">删除</a>
                                            |&nbsp;&nbsp;<a href="javascript:if(confirm('确认复制？'))location='{:U('device_copys',array('id'=>$mlist[id]))}'">复制</a>

                                        </td>
                                    </tr>
                                </volist>
                                <tr>
                                    <td style="text-align:left" colspan="2"> </td>
                                    <td style="text-align:center" colspan="8" id="pages">{$page}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</block>